
require 'cdo/activity_constants'

class Activity < ActiveRecord::Base
  include ActivityConstants

  def Activity.best?(result)
    return false if result.nil?
    (result == BEST_PASS_RESULT)
  end

  def Activity.perfect?(result)
    return false if result.nil?
    (result > MAXIMUM_NONOPTIMAL_RESULT)
  end

  def Activity.passing?(result)
    return false if result.nil?
    (result >= MINIMUM_PASS_RESULT)
  end

  def Activity.finished?(result)
    return false if result.nil?
    (result >= MINIMUM_FINISHED_RESULT)
  end

end
